feat(bigquery): add anonymous connection method using AnonymousCredentials #1304
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
resolves dbt-labs/dbt-bigquery#358
docs dbt-labs/docs.getdbt.com/#
Related PR: #1045
Note: Even though issue dbt-labs/dbt-bigquery#358 has been marked as resolved, it is only partially resolved. PR #1045 added the
api_endpointconfig, but in order to use (at least some) of the bigquery emulators, we need to be able to use Anonymous credentials.Problem
BigQuery users need a way to connect without credentials (e.g., BigQuery emulator or public/read-only endpoints). Today, dbt-bigquery requires an authenticated method, which blocks these scenarios.
Solution
Add a new connection method, ANONYMOUS, to BigQueryConnectionMethod.
When method=anonymous, create google.auth.credentials.AnonymousCredentials.
Add a unit test that validates the anonymous config and connection acquisition.
No changes to default behavior; this is opt-in and limited to the BigQuery adapter.
This in conjunction with #1045, will allow users to setup dbt to connect to an emulator like https://github.com/goccy/bigquery-emulator
Alternatives Considered
Checklist
Note: This introduces a new profile method value: "anonymous"